<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block data-th-replace="/adminlte/base::base-head"></th:block>
    <link rel="stylesheet" href="/plugins/datatables-bs4/css/dataTables.bootstrap4.css">
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
    <th:block data-th-replace="/adminlte/base::base-navbar"></th:block>
    <th:block data-th-replace="/adminlte/base::base-main-sidebar"></th:block>
    <div class="content-wrapper">
        <th:block data-th-replace="/adminlte/base::base-content-header"></th:block>
        <section class="content">
            <div class="container-fluid">
                <div class="card">
                    <div class="card-body table-responsive">
                        <div class="table-responsive">
                            <table id="role-table" class="table table-bordered table-hover">
                                <colgroup>
                                    <col width="100"/>
                                    <col width="200"/>
                                    <col/>
                                    <col width="100"/>
                                </colgroup>
                                <thead>
                                <tr>
                                    <th>KEY值</th>
                                    <th>标题</th>
                                    <th>备注</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
									<tr data-th-each="template : ${templateList}">
										<td data-th-utext="${template.key}">排序
										</td>
										<td data-th-utext="${template.title}">角色名称
										</td>
										<td data-th-utext="${template.remark}">角色描述
										</td>
										<td class="td-manage">
											<a title="编辑模板"
											   th:href="${'/admin/mail/template/'+template.key}"
											   style="margin-left: 10px;"> <i
													class="fas fa-edit text-blue"></i>
											</a>
											<a title="删除模板"
											   data-dialog="confirm"
											   data-url="/emails/templates/"
											   data-method="delete"
											   th:data-path="${template.key}"
											   data-dialog-t-title="危险操作！"
											   data-dialog-t-msg="除非您卸载了这个模板关联的模块，否则请不要删除模板，因为这会导致您的模块无法正常工作！仍然要删除当前模板吗？" 
											   style="margin-left: 10px;">
												<i class="fas fa-trash text-blue"></i>
											</a>
										</td>
									</tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <th:block data-th-replace="/adminlte/base::base-footer"></th:block>
    <th:block data-th-replace="/adminlte/base::base-control-sidebar"></th:block>
</div>
<script src="/plugins/datatables/jquery.dataTables.js"></script>
<script src="/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
<script src="/kaibes/js/table-data.js"></script>
<script type="text/javascript">
    dataTable(0, [1, 2, 3]);
</script>
</body>
</html>